package com.sumer.psychology.common.resource;

import com.sumer.psychology.blog.resource.BlogResource;
import com.sumer.psychology.comment.resource.CommentResource;
import com.sumer.psychology.common.application.ViewerStatisticsFilter;
import com.sumer.psychology.common.media.GsonMessageBodyHandler;
import com.sumer.psychology.friendship.resource.FriendshipResource;
import com.sumer.psychology.microblog.resource.MicroBlogResource;
import com.sumer.psychology.photo.resource.PhotoResource;
import com.sumer.psychology.sharing.resource.SharingResource;
import com.sumer.psychology.space.resource.SpaceResource;
import org.glassfish.jersey.server.ResourceConfig;

import javax.ws.rs.ApplicationPath;

/**
 * 注册资源
 * <p/>
 * User: zhenguang.zhu
 * Date: 2014/9/12
 * Time: 16:27
 */
@ApplicationPath("/")
public class ResourceApplication extends ResourceConfig {
    public ResourceApplication() {
        registerClasses(
                BlogResource.class,
                CommentResource.class,
                FriendshipResource.class,
                MicroBlogResource.class,
                SharingResource.class,
                PhotoResource.class,
                SpaceResource.class,
                AuthResource.class,
                ThirdPartyResource.class);
        register(GsonMessageBodyHandler.class);
        register(ViewerStatisticsFilter.class);
    }
}
